typedef unsigned char  BYTE;
typedef unsigned short WORD;
typedef unsigned long  DWORD;
typedef long LONG;

// #pragma pack(1)
typedef struct {
    WORD bfType;
    DWORD bfSize;      
    WORD bfReserved1; 
    WORD bfReserved2; 
    DWORD bfOffBits;
} BITMAPFILEHEADER;
 
typedef struct {
    DWORD biSize;            
    LONG biWidth;           
    LONG biHeight;          
    WORD biPlanes;          
    WORD biBitCount;        
    DWORD biCompression;     
    DWORD biSizeImage;       
    LONG biXPelsPerMeter;   
    LONG biYPelsPerMeter;   
    DWORD biClrUsed;         
    DWORD biClrImportant;    
} BITMAPINFOHEADER;